package main

import (
	"encoding/json"
	"fmt"
	"reflect"
)

type MyInt int

type MyPerson struct {
	Name     string
	Age      int
	SelfData MyInt
	eyes     int
}

func main() {

	var m MyInt = 9
	fmt.Println(reflect.TypeOf(m))
	fmt.Println(reflect.ValueOf(m))

	var p MyPerson = MyPerson{
		"arr",
		18,
		9,
		0,
	}

	fmt.Println(reflect.TypeOf(p))
	fmt.Println(reflect.TypeOf(p.SelfData).Kind())
	fmt.Println(reflect.ValueOf(p))

	fmt.Println(reflect.TypeOf(p.Name))
	fmt.Println(reflect.TypeOf(p.Age))
	fmt.Println(reflect.TypeOf(p.SelfData))
	fmt.Println(reflect.ValueOf(p.Age))

	r, _ := json.Marshal(p)
	fmt.Println(string(r))

	s := json.Unmarshal(r, &p)
	fmt.Println(s)
}
